import { defineStore } from "pinia";
import api from "@/api";
const useDemoStore = defineStore("demo", {
  state: () => ({
    Routes: [],
  }),
  actions: {
    async getRoutesAction() {
      let result = await api.user.getMenuApi();
      this.Routes = result.data.data;
    },
  },
  persist: {
    enabled: true,
    strategies: [
      {
        key: "my_user",
        storage: localStorage,
      },
    ],
  },
});
export default useDemoStore;
